
print("=== BMI计算器 ===")

weight = float(input("请输入体重(kg): "))
height = float(input("请输入身高(m): "))

bmi = weight / (height * height)

if bmi < 18.5:
    category = "体重过轻"
elif bmi >= 18.5 and bmi <= 24.9:
    category = "正常范围"
elif bmi >= 25 and bmi <= 29.9:
    category = "超重"
else:
    category = "肥胖"

print(f"\n身高: {height}m")
print(f"体重: {weight}kg")
print(f"BMI指数: {bmi:.1f}")
print(f"体重状况: {category}")

print("\n=== BMI参考标准 ===")
print("BMI < 18.5    : 体重过轻")
print("18.5-24.9     : 正常范围")
print("25-29.9       : 超重")
print("BMI ≥ 30      : 肥胖")